package com.fr.data.core.define;

import com.fr.base.core.ComparatorUtils;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;

public class XMLColumnNameDateType extends XMLColumnNameType
{
  private String format = null;

  public XMLColumnNameDateType()
  {
    this.type = 2;
  }

  public XMLColumnNameDateType(String paramString1, String paramString2)
  {
    super(paramString1, 2);
    this.format = paramString2;
  }

  public void setType(int paramInt)
  {
  }

  public String getFormat()
  {
    return this.format;
  }

  public void setFormat(String paramString)
  {
    this.format = paramString;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    super.readXML(paramXMLableReader);
    if ((paramXMLableReader.isChildNode()) && ("Format".equals(paramXMLableReader.getTagName())))
    {
      String str;
      if ((str = paramXMLableReader.getElementValue()) != null)
        this.format = str;
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    super.writeXML(paramXMLPrintWriter);
    paramXMLPrintWriter.startTAG("Format").textNode(getFormat()).end();
  }

  public boolean equals(Object paramObject)
  {
    return ((paramObject instanceof XMLColumnNameDateType) && (super.equals(paramObject)) && (ComparatorUtils.equals(this.format, ((XMLColumnNameDateType)paramObject).format)));
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    XMLColumnNameDateType localXMLColumnNameDateType = (XMLColumnNameDateType)super.clone();
    return localXMLColumnNameDateType;
  }
}